import bodyParser from 'body-parser';
import router from './router';

const express = require('express');

const app = express();
// app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
router(app); // 配置路由

const server = app.listen(3333, function () {
  // const host = server.address().address;
  const port = server.address().port;
  console.log('listening at port: %s', port);
});
